package redora.rdo.client.validation;

import com.google.gwt.libideas.validation.client.ErrorHandler;
import com.google.gwt.libideas.validation.client.Subject;
import com.google.gwt.libideas.validation.client.Validator;

public class NotNullValidator extends Validator {

	@Override
	public void checkValid(Subject element, ErrorHandler handler) {
		if(element.getValue() == null || element.getValue().toString().trim().length() <= 0)
			handler.reportError(element, element.getLabel() + " cannot be null value!");
	}

}
